package jia;

import java.util.Map;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import jason.asSemantics.DefaultInternalAction;
import jason.asSemantics.TransitionSystem;
import jason.asSemantics.Unifier;
import jason.asSyntax.NumberTerm;
import jason.asSyntax.NumberTermImpl;
import jason.asSyntax.SourceInfo;
import jason.asSyntax.Term;
import jason.asSyntax.VarTerm;

public class forward extends DefaultInternalAction {

	@Override
	public Object execute(TransitionSystem ts, Unifier un, Term[] args)
			throws Exception {
        int posX = (int) ((NumberTerm) args[0]).solve();
        int posY = (int) ((NumberTerm) args[1]).solve();
        Term tarX = args[2];
        Term tarY = args[3];
        boolean a = un.unifies(tarX, new NumberTermImpl(posX +5));
        boolean b = un.unifies(tarY, new NumberTermImpl(posY));
        return a && b;
	}


	
}
